package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;

/*重复购买订单*/
@Entity
@Table(name = "dingdan")
public class CFGMDingdan {
    private int ddId;//订单id
    private Kehu kH;//客户id
    private Hetong hetong;//合同id
    private String ddHao;//订单号
    private BigDecimal ddMoney;//订单总额
    private String ddFukuanfanshi;//订单付款方式
    private Timestamp ddTime;//订单时间
    private Timestamp ddZuiwanfahuo;//订单最晚发货
    private String ddSyz;//订单所有者
    private String ddZhuangtai;//订单状态
    private String ddJiekuanfanshi;//订单结款方式
    private String ddBeizhu;//订单备注

    private int ddYs;//判断订单是否移除
    private String province;//省
    private String city;//市
    private String area;//区
    private String ddPhone;//电话dd_phone
    private String ddAddress;//详细地址
    private String ddShouhuoren;//收货人

    private String cfgmDdhao;//重复购买的订单号;

    public List<Dingdanxiangqing> ddXiangQingList;//订单详情里面读出来


    public CFGMDingdan() {
    }

    public CFGMDingdan(String ddHao) {
        this.ddHao = ddHao;
    }

    @Basic
    @Column(name = "cfgm_ddhao")
    public String getCfgmDdhao() {
        return cfgmDdhao;
    }

    public void setCfgmDdhao(String cfgmDdhao) {
        this.cfgmDdhao = cfgmDdhao;
    }

    @Basic
    @Column(name = "dd_shouhuoren")
    public String getDdShouhuoren() {
        return ddShouhuoren;
    }

    public void setDdShouhuoren(String ddShouhuoren) {
        this.ddShouhuoren = ddShouhuoren;
    }

    @Basic
    @Column(name = "province", nullable = false)
    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    @Basic
    @Column(name = "city", nullable = false)
    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    @Basic
    @Column(name = "area", nullable = false)
    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    @Basic
    @Column(name = "dd_phone", nullable = false)
    public String getDdPhone() {
        return ddPhone;
    }

    public void setDdPhone(String ddPhone) {
        this.ddPhone = ddPhone;
    }

    @Basic
    @Column(name = "dd_ys")
    public int getDdYs() {
        return ddYs;
    }

    public void setDdYs(int ddYs) {
        this.ddYs = ddYs;
    }

    @Id
    @Column(name = "dd_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getDdId() {
        return ddId;
    }

    public void setDdId(int ddId) {
        this.ddId = ddId;
    }

    @ManyToOne
    @JoinColumn(name = "k_id", referencedColumnName = "k_id")
    public Kehu getkH() {
        return kH;
    }

    public void setkH(Kehu kH) {
        this.kH = kH;
    }

    @ManyToOne
    @JoinColumn(name = "ht_id", referencedColumnName = "ht_id")
    public Hetong getHetong() {
        return hetong;
    }

    public void setHetong(Hetong hetong) {
        this.hetong = hetong;
    }

    @Basic
    @Column(name = "dd_hao", nullable = true, length = 200)
    public String getDdHao() {
        return ddHao;
    }

    public void setDdHao(String ddHao) {
        this.ddHao = ddHao;
    }

    @Basic
    @Column(name = "dd_money", nullable = true, precision = 2)
    public BigDecimal getDdMoney() {
        return ddMoney;
    }

    public void setDdMoney(BigDecimal ddMoney) {
        this.ddMoney = ddMoney;
    }

    @Basic
    @Column(name = "dd_fukuanfanshi", nullable = true, length = 200)
    public String getDdFukuanfanshi() {
        return ddFukuanfanshi;
    }

    public void setDdFukuanfanshi(String ddFukuanfanshi) {
        this.ddFukuanfanshi = ddFukuanfanshi;
    }

    @Basic
    @Column(name = "dd_time", nullable = false)
    public Timestamp getDdTime() {
        return ddTime;
    }

    public void setDdTime(Timestamp ddTime) {
        this.ddTime = ddTime;
    }

    @Basic
    @Column(name = "dd_zuiwanfahuo", nullable = false)
    public Timestamp getDdZuiwanfahuo() {
        return ddZuiwanfahuo;
    }

    public void setDdZuiwanfahuo(Timestamp ddZuiwanfahuo) {
        this.ddZuiwanfahuo = ddZuiwanfahuo;
    }

    @Basic
    @Column(name = "dd_syz", nullable = true, length = 200)
    public String getDdSyz() {
        return ddSyz;
    }

    public void setDdSyz(String ddSyz) {
        this.ddSyz = ddSyz;
    }

    @Basic
    @Column(name = "dd_zhuangtai", nullable = true, length = 200)
    public String getDdZhuangtai() {
        return ddZhuangtai;
    }

    public void setDdZhuangtai(String ddZhuangtai) {
        this.ddZhuangtai = ddZhuangtai;
    }

    @Basic
    @Column(name = "dd_jiekuanfanshi", nullable = true, length = 200)
    public String getDdJiekuanfanshi() {
        return ddJiekuanfanshi;
    }

    public void setDdJiekuanfanshi(String ddJiekuanfanshi) {
        this.ddJiekuanfanshi = ddJiekuanfanshi;
    }

    @Basic
    @Column(name = "dd_address", nullable = true, length = 200)
    public String getDdAddress() {
        return ddAddress;
    }

    public void setDdAddress(String ddAddress) {
        this.ddAddress = ddAddress;
    }

    @Basic
    @Column(name = "dd_beizhu", nullable = true, length = 200)
    public String getDdBeizhu() {
        return ddBeizhu;
    }

    public void setDdBeizhu(String ddBeizhu) {
        this.ddBeizhu = ddBeizhu;
    }

}
